<template>
	<!-- 服药记录 -->
	<view class="PharmacyRecords">
		<view v-for="(item,index) of list" :key='index' @click="C_listItem(item.id)">
			<image v-if="vuex_httpImageUrl" :src="vuex_httpImageUrl+'static/my/色相_饱和度 1 拷贝 4.png'" mode="widthFix"></image>
			<view class="name">{{item.name}}</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:[]
			};
		},
		onShow() {
			this.def_list()
		},
		methods:{
			C_listItem(id){
				uni.navigateTo({
					url:'./detail/detail?id='+id
				})
			},
			def_list(page = 1){
				this.$u.post('/appuser/prescriplst',{page}).then(res=>{
					console.log(res);
					let {count,list} = res.data
					this.list = list
				})
			}
		}
	}
</script>

<style lang="scss">
	.PharmacyRecords{
		>view{
			display: flex;
			align-items: center;
			background-color: #FFFFFF;
			width: 95%;
			padding: 10rpx;
			margin: 20rpx auto;
			border-radius:20rpx ;
			image{
				width: 80rpx;
				height: 80rpx;
				margin-right: 15rpx;
			}
		}
	}
</style>
